package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t=new Thread("threadone"){
            @Override
            public void run() {
                String name =this.getName();
                System.out.println(name);
                long id =this.getId();//唯一标识

                int priority=this.getPriority();
                System.out.println(priority);

                boolean isInterrupted=this.isInterrupted();
                System.out.println("是否被中断:"+isInterrupted);

                boolean isDaemon=this.isDaemon();
                System.out.println("是否是守护线程:"+isDaemon);

                boolean isAlive=this.isAlive();
                System.out.println("是否存活:"+isAlive);
            }
        };
        t.start();



    }
}
